//
//  SE_View_TableViewCell.m
//  SkyEye
//
//  Created by dllo on 16/8/9.
//  Copyright © 2016年 SE. All rights reserved.
//

#import "SE_View_TableViewCell.h"
#import "UIImageView+WebCache.h"
#import "SE_View_Model.h"

#define WIDTH self.backView.bounds.size.width
#define HEIGHT self.backView.bounds.size.height

@interface SE_View_TableViewCell()

//封面图片
@property (nonatomic, retain) UIImageView *coverImage;

@end

@implementation SE_View_TableViewCell

-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        
        self.coverImage = [[UIImageView alloc]init];
        [self.contentView addSubview:self.coverImage];
    }
    return self;
}

-(void)layoutSubviews{
    [super layoutSubviews];
    self.coverImage.frame = self.contentView.bounds;
}

-(void)setViewModel:(SE_View_Model *)viewModel{
    _viewModel = viewModel;
    [self.coverImage sd_setImageWithURL:[NSURL URLWithString:viewModel.image] placeholderImage:[UIImage imageNamed:@"holder" ]];
}

@end


















